//package com.sinothk.special.im.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.sinothk.special.im.entity.MessageAll;
//import com.sinothk.special.im.service.IMessageAllService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.jeecg.common.api.vo.Result;
//import org.jeecg.common.aspect.annotation.AutoLog;
//import org.jeecg.common.system.base.controller.JeecgController;
//import org.jeecg.common.system.query.QueryGenerator;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//
///**
// * @Description: 消息中心-所有消息
// * @Author: Liangyt
// * @Date: 2022-01-24
// * @Version: V1.0
// */
//@Api(tags = "消息中心-所有消息")
//@RestController
//@RequestMapping("/im/messageAll")
//@Slf4j
//public class MessageAllController extends JeecgController<MessageAll, IMessageAllService> {
//
//    @Autowired
//    private IMessageAllService messageAllService;
//
//    /**
//     * 分页列表查询
//     *
//     * @param messageAll
//     * @param pageNo
//     * @param pageSize
//     * @param req
//     * @return
//     */
//    @AutoLog(value = "消息中心-所有消息-分页列表查询")
//    @ApiOperation(value = "消息中心-所有消息-分页列表查询", notes = "消息中心-所有消息-分页列表查询")
//    @GetMapping(value = "/list")
//    public Result<?> queryPageList(MessageAll messageAll,
//                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
//                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
//                                   HttpServletRequest req) {
//        QueryWrapper<MessageAll> queryWrapper = QueryGenerator.initQueryWrapper(messageAll, req.getParameterMap());
//        Page<MessageAll> page = new Page<MessageAll>(pageNo, pageSize);
//        IPage<MessageAll> pageList = messageAllService.page(page, queryWrapper);
//        return Result.OK(pageList);
//    }
//
//    /**
//     * 用户间消息
//     *
//     * @param pageNo
//     * @param pageSize
//     * @return
//     */
//    @AutoLog(value = "消息中心-用户间消息")
//    @ApiOperation(value = "消息中心-用户间消息", notes = "用户间消息")
//    @GetMapping(value = "/listForCurrUser")
//    public Result<?> listForCurrUser(
//            @RequestParam(name = "receiveUserId") String receiveUserId,
//            @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
//            @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
//        return Result.OK(messageAllService.listForCurrUser(receiveUserId, pageNo, pageSize));
//    }
//
////	/**
////	 *   添加
////	 *
////	 * @param messageAll
////	 * @return
////	 */
////	@AutoLog(value = "消息中心-所有消息-添加")
////	@ApiOperation(value="消息中心-所有消息-添加", notes="消息中心-所有消息-添加")
////	@PostMapping(value = "/add")
////	public Result<?> add(@RequestBody MessageAll messageAll) {
////		messageAllService.save(messageAll);
////		return Result.OK("添加成功！");
////	}
////
////	/**
////	 *  编辑
////	 *
////	 * @param messageAll
////	 * @return
////	 */
////	@AutoLog(value = "消息中心-所有消息-编辑")
////	@ApiOperation(value="消息中心-所有消息-编辑", notes="消息中心-所有消息-编辑")
////	@PutMapping(value = "/edit")
////	public Result<?> edit(@RequestBody MessageAll messageAll) {
////		messageAllService.updateById(messageAll);
////		return Result.OK("编辑成功!");
////	}
////
////	/**
////	 *   通过id删除
////	 *
////	 * @param id
////	 * @return
////	 */
////	@AutoLog(value = "消息中心-所有消息-通过id删除")
////	@ApiOperation(value="消息中心-所有消息-通过id删除", notes="消息中心-所有消息-通过id删除")
////	@DeleteMapping(value = "/delete")
////	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
////		messageAllService.removeById(id);
////		return Result.OK("删除成功!");
////	}
////
////	/**
////	 *  批量删除
////	 *
////	 * @param ids
////	 * @return
////	 */
////	@AutoLog(value = "消息中心-所有消息-批量删除")
////	@ApiOperation(value="消息中心-所有消息-批量删除", notes="消息中心-所有消息-批量删除")
////	@DeleteMapping(value = "/deleteBatch")
////	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
////		this.messageAllService.removeByIds(Arrays.asList(ids.split(",")));
////		return Result.OK("批量删除成功!");
////	}
////
////	/**
////	 * 通过id查询
////	 *
////	 * @param id
////	 * @return
////	 */
////	@AutoLog(value = "消息中心-所有消息-通过id查询")
////	@ApiOperation(value="消息中心-所有消息-通过id查询", notes="消息中心-所有消息-通过id查询")
////	@GetMapping(value = "/queryById")
////	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
////		MessageAll messageAll = messageAllService.getById(id);
////		if(messageAll==null) {
////			return Result.error("未找到对应数据");
////		}
////		return Result.OK(messageAll);
////	}
////
////    /**
////    * 导出excel
////    *
////    * @param request
////    * @param messageAll
////    */
////    @RequestMapping(value = "/exportXls")
////    public ModelAndView exportXls(HttpServletRequest request, MessageAll messageAll) {
////        return super.exportXls(request, messageAll, MessageAll.class, "消息中心-所有消息");
////    }
////
////    /**
////      * 通过excel导入数据
////    *
////    * @param request
////    * @param response
////    * @return
////    */
////    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
////    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
////        return super.importExcel(request, response, MessageAll.class);
////    }
//
//}
